package com.marvels.financial.loan.service;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.Page;
import com.marvels.financial.loan.dto.LoanBankTransactionDto;
import com.marvels.financial.pay.bfpay.dto.BankTransactionDto;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.web.bind.annotation.RequestBody;

import com.marvels.common.dto.MarvelsResultDTO;
import com.marvels.common.exception.MarvelsBusinessException;
import com.marvels.financial.loan.dto.LoanAuditConditionDto;
import com.marvels.financial.loan.dto.McptProductMappedDto;

public interface LoanQueryApi {

	/**
	 * 放款查询筛选条件
	 * @return
	 */
	public Map<String, Object> listScreenCondition() throws MarvelsBusinessException;




	/**
	 * 放款查询列表
	 * @param loanAuditConditionDto
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public MarvelsResultDTO loanQueryList(LoanAuditConditionDto loanAuditConditionDto) throws MarvelsBusinessException;



	/**
	 * 下载excel
	 * @param loanAuditConditionDto
	 * @return
	 */
	public HSSFWorkbook exportExcel(LoanAuditConditionDto loanAuditConditionDto) throws MarvelsBusinessException;


	/**
	 * 放款
	 * @param loanId
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public MarvelsResultDTO loanPayment(String loanId) throws MarvelsBusinessException;


	/**
	 * 线上放款
	 * @param loanId
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public MarvelsResultDTO onlineLendPayment(String loanId) throws MarvelsBusinessException;


	/**
	 * 查询状态
	 * @param loanId
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public MarvelsResultDTO checkStatus(String loanId) throws MarvelsBusinessException;



	/**
	 * 出账否决
	 * @param loanAuditConditionDto
	 * @throws MarvelsBusinessException
	 */
	public  void accountVeto(LoanAuditConditionDto loanAuditConditionDto) throws MarvelsBusinessException;


	/**
	 * 查询可以更换的资金源
	 * @param loanAuditConditionDto
	 * @throws MarvelsBusinessException
	 */
	public  List<McptProductMappedDto> changeFundList(@RequestBody LoanAuditConditionDto loanAuditConditionDto) throws MarvelsBusinessException;


	public Page<BankTransactionDto> mcamLoanBankFlowQuery(@RequestBody LoanBankTransactionDto loanBankTransactionDto) throws MarvelsBusinessException;


	/**
	 * 更换资金源
	 * @param loanAuditConditionDto
	 * @throws MarvelsBusinessException
	 */
	public  void replaceFundResource(@RequestBody LoanAuditConditionDto loanAuditConditionDto) throws MarvelsBusinessException;

	public void applyBankFlow(@RequestBody LoanBankTransactionDto loanBankTransactionDto);

}
